package com.dinzeer.legendreliclib.lib.key;


import net.minecraft.world.entity.player.Player;
import net.minecraftforge.event.entity.player.PlayerEvent;

/**
 * 特殊类型按键事件基类
 */
public abstract class SpecialTypeKeyEvent extends PlayerEvent {
    private final SpecialKeyType keyType;
    
    public SpecialTypeKeyEvent(Player player, SpecialKeyType keyType) {
        super(player);
        this.keyType = keyType;
    }
    
    public SpecialKeyType getKeyType() {
        return keyType;
    }
    
    public int getKeyIndex() {
        return keyType.getIndex();
    }
    
    public String getKeyName() {
        return keyType.getName();
    }
    
    public static class SpecialTypeKey1PressedEvent extends SpecialTypeKeyEvent {
        public SpecialTypeKey1PressedEvent(Player player) {
            super(player, SpecialKeyType.KEY_1);
        }
    }



    public static class SpecialTypeKey1ReleasedEvent extends SpecialTypeKeyEvent {
        public SpecialTypeKey1ReleasedEvent(Player player) {
            super(player, SpecialKeyType.KEY_1);
        }
    }


    public static class SpecialTypeKey2PressedEvent extends SpecialTypeKeyEvent {
        public SpecialTypeKey2PressedEvent(Player player) {
            super(player, SpecialKeyType.KEY_2);
        }
    }



    public static class SpecialTypeKey2ReleasedEvent extends SpecialTypeKeyEvent {
        public SpecialTypeKey2ReleasedEvent(Player player) {
            super(player, SpecialKeyType.KEY_2);
        }
    }


    public static class SpecialTypeKey3PressedEvent extends SpecialTypeKeyEvent {
        public SpecialTypeKey3PressedEvent(Player player) {
            super(player, SpecialKeyType.KEY_3);
        }
    }


    public static class SpecialTypeKey3ReleasedEvent extends SpecialTypeKeyEvent {
        public SpecialTypeKey3ReleasedEvent(Player player) {
            super(player, SpecialKeyType.KEY_3);
        }
    }



    public static class SpecialTypeKey4PressedEvent extends SpecialTypeKeyEvent {
        public SpecialTypeKey4PressedEvent(Player player) {
            super(player, SpecialKeyType.KEY_4);
        }
    }


    public static class SpecialTypeKey4ReleasedEvent extends SpecialTypeKeyEvent {
        public SpecialTypeKey4ReleasedEvent(Player player) {
            super(player, SpecialKeyType.KEY_4);
        }
    }


    public static class SpecialTypeKey5PressedEvent extends SpecialTypeKeyEvent {
        public SpecialTypeKey5PressedEvent(Player player) {
            super(player, SpecialKeyType.KEY_5);
        }
    }


    public static class SpecialTypeKey5ReleasedEvent extends SpecialTypeKeyEvent {
        public SpecialTypeKey5ReleasedEvent(Player player) {
            super(player, SpecialKeyType.KEY_5);
        }
    }
}